package com.tedu.openmedical.medicalsystem.sysDict.service.impl;

import com.tedu.openmedical.medicalsystem.sysDict.mapper.SysDictDataMapper;
import com.tedu.openmedical.medicalsystem.sysDict.pojo.dto.DictQuery;
import com.tedu.openmedical.medicalsystem.sysDict.pojo.vo.SysDictDataVO;
import com.tedu.openmedical.medicalsystem.sysDict.service.SysDictDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
@Slf4j
public class SysDictDataServiceImpl implements SysDictDataService {


    @Autowired
    private SysDictDataMapper sysDictDataMapper;

    @Override
    public List<SysDictDataVO> selectDictList(DictQuery dictQuery) {
        List<SysDictDataVO> dictList = sysDictDataMapper.selectDictList(dictQuery);
        log.debug("查询字典数据成功，dictList={}", dictList);
        if (dictList == null) {
            return Collections.emptyList();
        }
        return dictList;
    }
}
